Integrand size = 36, antiderivative size = 145 \[ \int (a+a \sin (e+f x))^m (A+B \sin (e+f x)) (c-c \sin (e+f x))^3 \, dx=\frac {2^{\frac {1}{2}+m} a^4 c^3 (B (3-m)-A (4+m)) \cos ^7(e+f x) \operatorname {Hypergeometric2F1}\left (\frac {7}{2},\frac {1}{2}-m,\frac {9}{2},\frac {1}{2} (1-\sin (e+f x))\right ) (1+\sin (e+f x))^{\frac {1}{2}-m} (a+a \sin (e+f x))^{-4+m}}{7 f (4+m)}-\frac {a^3 B c^3 \cos ^7(e+f x) (a+a \sin (e+f x))^{-3+m}}{f (4+m)} \]
1/7*2^(1/2+m)*a^4*c^3*(B*(3-m)-A*(4+m))*cos(f*x+e)^7*hypergeom([7/2, 1/2-m ],[9/2],1/2-1/2*sin(f*x+e))*(1+sin(f*x+e))^(1/2-m)*(a+a*sin(f*x+e))^(-4+m) /f/(4+m)-a^3*B*c^3*cos(f*x+e)^7*(a+a*sin(f*x+e))^(-3+m)/f/(4+m)
Result contains complex when optimal does not.
Time = 26.95 (sec) , antiderivative size = 604, normalized size of antiderivative = 4.17 \[ \int (a+a \sin (e+f x))^m (A+B \sin (e+f x)) (c-c \sin (e+f x))^3 \, dx=-\frac {(a (1+\sin (e+f x)))^m (c-c \sin (e+f x))^3 (\cos (e+f x)+i (1+\sin (e+f x))) \left (-\frac {10 (4 A-3 B) \operatorname {Hypergeometric2F1}(1,1+m,1-m,i \cos (e+f x)-\sin (e+f x))}{m}+\frac {2 (15 A-13 B) \operatorname {Hypergeometric2F1}(1,2+m,2-m,i \cos (e+f x)-\sin (e+f x)) (-i \cos (e+f x)+\sin (e+f x))}{-1+m}+\frac {2 (15 A-13 B) \operatorname {Hypergeometric2F1}(1,m,-m,i \cos (e+f x)-\sin (e+f x)) (i \cos (e+f x)+\sin (e+f x))}{1+m}+\frac {4 (3 A-4 B) \operatorname {Hypergeometric2F1}(1,-1+m,-1-m,i \cos (e+f x)-\sin (e+f x)) (\cos (2 (e+f x))-i \sin (2 (e+f x)))}{2+m}+\frac {4 (3 A-4 B) \operatorname {Hypergeometric2F1}(1,3+m,3-m,i \cos (e+f x)-\sin (e+f x)) (\cos (2 (e+f x))+i \sin (2 (e+f x)))}{-2+m}-\frac {2 i (A-3 B) \operatorname {Hypergeometric2F1}(1,-2+m,-2-m,i \cos (e+f x)-\sin (e+f x)) (\cos (3 (e+f x))-i \sin (3 (e+f x)))}{3+m}+\frac {2 i (A-3 B) \operatorname {Hypergeometric2F1}(1,4+m,4-m,i \cos (e+f x)-\sin (e+f x)) (\cos (3 (e+f x))+i \sin (3 (e+f x)))}{-3+m}+\frac {B \operatorname {Hypergeometric2F1}(1,-3+m,-3-m,i \cos (e+f x)-\sin (e+f x)) (\cos (4 (e+f x))-i \sin (4 (e+f x)))}{4+m}+\frac {B \operatorname {Hypergeometric2F1}(1,5+m,5-m,i \cos (e+f x)-\sin (e+f x)) (\cos (4 (e+f x))+i \sin (4 (e+f x)))}{-4+m}\right )}{16 f \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^6} \]
-1/16*((a*(1 + Sin[e + f*x]))^m*(c - c*Sin[e + f*x])^3*(Cos[e + f*x] + I*( 1 + Sin[e + f*x]))*((-10*(4*A - 3*B)*Hypergeometric2F1[1, 1 + m, 1 - m, I* Cos[e + f*x] - Sin[e + f*x]])/m + (2*(15*A - 13*B)*Hypergeometric2F1[1, 2 + m, 2 - m, I*Cos[e + f*x] - Sin[e + f*x]]*((-I)*Cos[e + f*x] + Sin[e + f* x]))/(-1 + m) + (2*(15*A - 13*B)*Hypergeometric2F1[1, m, -m, I*Cos[e + f*x ] - Sin[e + f*x]]*(I*Cos[e + f*x] + Sin[e + f*x]))/(1 + m) + (4*(3*A - 4*B )*Hypergeometric2F1[1, -1 + m, -1 - m, I*Cos[e + f*x] - Sin[e + f*x]]*(Cos [2*(e + f*x)] - I*Sin[2*(e + f*x)]))/(2 + m) + (4*(3*A - 4*B)*Hypergeometr ic2F1[1, 3 + m, 3 - m, I*Cos[e + f*x] - Sin[e + f*x]]*(Cos[2*(e + f*x)] + I*Sin[2*(e + f*x)]))/(-2 + m) - ((2*I)*(A - 3*B)*Hypergeometric2F1[1, -2 + m, -2 - m, I*Cos[e + f*x] - Sin[e + f*x]]*(Cos[3*(e + f*x)] - I*Sin[3*(e + f*x)]))/(3 + m) + ((2*I)*(A - 3*B)*Hypergeometric2F1[1, 4 + m, 4 - m, I* Cos[e + f*x] - Sin[e + f*x]]*(Cos[3*(e + f*x)] + I*Sin[3*(e + f*x)]))/(-3 + m) + (B*Hypergeometric2F1[1, -3 + m, -3 - m, I*Cos[e + f*x] - Sin[e + f* x]]*(Cos[4*(e + f*x)] - I*Sin[4*(e + f*x)]))/(4 + m) + (B*Hypergeometric2F 1[1, 5 + m, 5 - m, I*Cos[e + f*x] - Sin[e + f*x]]*(Cos[4*(e + f*x)] + I*Si n[4*(e + f*x)]))/(-4 + m)))/(f*(Cos[(e + f*x)/2] - Sin[(e + f*x)/2])^6)
Time = 0.65 (sec) , antiderivative size = 137, normalized size of antiderivative = 0.94, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {3042, 3446, 3042, 3339, 3042, 3168, 80, 79}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (c-c \sin (e+f x))^3 (a \sin (e+f x)+a)^m (A+B \sin (e+f x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (c-c \sin (e+f x))^3 (a \sin (e+f x)+a)^m (A+B \sin (e+f x))dx\) |
\(\Big \downarrow \) 3446 |
\(\displaystyle a^3 c^3 \int \cos ^6(e+f x) (\sin (e+f x) a+a)^{m-3} (A+B \sin (e+f x))dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a^3 c^3 \int \cos (e+f x)^6 (\sin (e+f x) a+a)^{m-3} (A+B \sin (e+f x))dx\) |
\(\Big \downarrow \) 3339 |
\(\displaystyle a^3 c^3 \left (\left (A-\frac {B (3-m)}{m+4}\right ) \int \cos ^6(e+f x) (\sin (e+f x) a+a)^{m-3}dx-\frac {B \cos ^7(e+f x) (a \sin (e+f x)+a)^{m-3}}{f (m+4)}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a^3 c^3 \left (\left (A-\frac {B (3-m)}{m+4}\right ) \int \cos (e+f x)^6 (\sin (e+f x) a+a)^{m-3}dx-\frac {B \cos ^7(e+f x) (a \sin (e+f x)+a)^{m-3}}{f (m+4)}\right )\) |
\(\Big \downarrow \) 3168 |
\(\displaystyle a^3 c^3 \left (\frac {a^2 \left (A-\frac {B (3-m)}{m+4}\right ) \cos ^7(e+f x) \int (a-a \sin (e+f x))^{5/2} (\sin (e+f x) a+a)^{m-\frac {1}{2}}d\sin (e+f x)}{f (a-a \sin (e+f x))^{7/2} (a \sin (e+f x)+a)^{7/2}}-\frac {B \cos ^7(e+f x) (a \sin (e+f x)+a)^{m-3}}{f (m+4)}\right )\) |
\(\Big \downarrow \) 80 |
\(\displaystyle a^3 c^3 \left (\frac {a^2 2^{m-\frac {1}{2}} \left (A-\frac {B (3-m)}{m+4}\right ) \cos ^7(e+f x) (\sin (e+f x)+1)^{\frac {1}{2}-m} (a \sin (e+f x)+a)^{m-4} \int \left (\frac {1}{2} \sin (e+f x)+\frac {1}{2}\right )^{m-\frac {1}{2}} (a-a \sin (e+f x))^{5/2}d\sin (e+f x)}{f (a-a \sin (e+f x))^{7/2}}-\frac {B \cos ^7(e+f x) (a \sin (e+f x)+a)^{m-3}}{f (m+4)}\right )\) |
\(\Big \downarrow \) 79 |
\(\displaystyle a^3 c^3 \left (-\frac {a 2^{m+\frac {1}{2}} \left (A-\frac {B (3-m)}{m+4}\right ) \cos ^7(e+f x) (\sin (e+f x)+1)^{\frac {1}{2}-m} (a \sin (e+f x)+a)^{m-4} \operatorname {Hypergeometric2F1}\left (\frac {7}{2},\frac {1}{2}-m,\frac {9}{2},\frac {1}{2} (1-\sin (e+f x))\right )}{7 f}-\frac {B \cos ^7(e+f x) (a \sin (e+f x)+a)^{m-3}}{f (m+4)}\right )\) |
a^3*c^3*(-1/7*(2^(1/2 + m)*a*(A - (B*(3 - m))/(4 + m))*Cos[e + f*x]^7*Hype rgeometric2F1[7/2, 1/2 - m, 9/2, (1 - Sin[e + f*x])/2]*(1 + Sin[e + f*x])^ (1/2 - m)*(a + a*Sin[e + f*x])^(-4 + m))/f - (B*Cos[e + f*x]^7*(a + a*Sin[ e + f*x])^(-3 + m))/(f*(4 + m)))
3.2.96.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(( a + b*x)^(m + 1)/(b*(m + 1)*(b/(b*c - a*d))^n))*Hypergeometric2F1[-n, m + 1 , m + 2, (-d)*((a + b*x)/(b*c - a*d))], x] /; FreeQ[{a, b, c, d, m, n}, x] && !IntegerQ[m] && !IntegerQ[n] && GtQ[b/(b*c - a*d), 0] && (RationalQ[m] || !(RationalQ[n] && GtQ[-d/(b*c - a*d), 0]))
Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(c + d*x)^FracPart[n]/((b/(b*c - a*d))^IntPart[n]*(b*((c + d*x)/(b*c - a*d))) ^FracPart[n]) Int[(a + b*x)^m*Simp[b*(c/(b*c - a*d)) + b*d*(x/(b*c - a*d) ), x]^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && !IntegerQ[m] && !Integ erQ[n] && (RationalQ[m] || !SimplerQ[n + 1, m + 1])
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_.), x_Symbol] :> Simp[a^2*((g*Cos[e + f*x])^(p + 1)/(f*g*(a + b*Sin [e + f*x])^((p + 1)/2)*(a - b*Sin[e + f*x])^((p + 1)/2))) Subst[Int[(a + b*x)^(m + (p - 1)/2)*(a - b*x)^((p - 1)/2), x], x, Sin[e + f*x]], x] /; Fre eQ[{a, b, e, f, g, m, p}, x] && EqQ[a^2 - b^2, 0] && !IntegerQ[m]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-d)* (g*Cos[e + f*x])^(p + 1)*((a + b*Sin[e + f*x])^m/(f*g*(m + p + 1))), x] + S imp[(a*d*m + b*c*(m + p + 1))/(b*(m + p + 1)) Int[(g*Cos[e + f*x])^p*(a + b*Sin[e + f*x])^m, x], x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && EqQ[ a^2 - b^2, 0] && NeQ[m + p + 1, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Si mp[a^m*c^m Int[Cos[e + f*x]^(2*m)*(c + d*Sin[e + f*x])^(n - m)*(A + B*Sin [e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && EqQ[b*c + a* d, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[m] && !(IntegerQ[n] && ((LtQ[m, 0] && GtQ[n, 0]) || LtQ[0, n, m] || LtQ[m, n, 0]))
\[\int \left (a +a \sin \left (f x +e \right )\right )^{m} \left (A +B \sin \left (f x +e \right )\right ) \left (c -c \sin \left (f x +e \right )\right )^{3}d x\]
\[ \int (a+a \sin (e+f x))^m (A+B \sin (e+f x)) (c-c \sin (e+f x))^3 \, dx=\int { -{\left (B \sin \left (f x + e\right ) + A\right )} {\left (c \sin \left (f x + e\right ) - c\right )}^{3} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} \,d x } \]
integral(-(B*c^3*cos(f*x + e)^4 + (3*A - 5*B)*c^3*cos(f*x + e)^2 - 4*(A - B)*c^3 - ((A - 3*B)*c^3*cos(f*x + e)^2 - 4*(A - B)*c^3)*sin(f*x + e))*(a*s in(f*x + e) + a)^m, x)
\[ \int (a+a \sin (e+f x))^m (A+B \sin (e+f x)) (c-c \sin (e+f x))^3 \, dx=- c^{3} \left (\int \left (- A \left (a \sin {\left (e + f x \right )} + a\right )^{m}\right )\, dx + \int 3 A \left (a \sin {\left (e + f x \right )} + a\right )^{m} \sin {\left (e + f x \right )}\, dx + \int \left (- 3 A \left (a \sin {\left (e + f x \right )} + a\right )^{m} \sin ^{2}{\left (e + f x \right )}\right )\, dx + \int A \left (a \sin {\left (e + f x \right )} + a\right )^{m} \sin ^{3}{\left (e + f x \right )}\, dx + \int \left (- B \left (a \sin {\left (e + f x \right )} + a\right )^{m} \sin {\left (e + f x \right )}\right )\, dx + \int 3 B \left (a \sin {\left (e + f x \right )} + a\right )^{m} \sin ^{2}{\left (e + f x \right )}\, dx + \int \left (- 3 B \left (a \sin {\left (e + f x \right )} + a\right )^{m} \sin ^{3}{\left (e + f x \right )}\right )\, dx + \int B \left (a \sin {\left (e + f x \right )} + a\right )^{m} \sin ^{4}{\left (e + f x \right )}\, dx\right ) \]
-c**3*(Integral(-A*(a*sin(e + f*x) + a)**m, x) + Integral(3*A*(a*sin(e + f *x) + a)**m*sin(e + f*x), x) + Integral(-3*A*(a*sin(e + f*x) + a)**m*sin(e + f*x)**2, x) + Integral(A*(a*sin(e + f*x) + a)**m*sin(e + f*x)**3, x) + Integral(-B*(a*sin(e + f*x) + a)**m*sin(e + f*x), x) + Integral(3*B*(a*sin (e + f*x) + a)**m*sin(e + f*x)**2, x) + Integral(-3*B*(a*sin(e + f*x) + a) **m*sin(e + f*x)**3, x) + Integral(B*(a*sin(e + f*x) + a)**m*sin(e + f*x)* *4, x))
\[ \int (a+a \sin (e+f x))^m (A+B \sin (e+f x)) (c-c \sin (e+f x))^3 \, dx=\int { -{\left (B \sin \left (f x + e\right ) + A\right )} {\left (c \sin \left (f x + e\right ) - c\right )}^{3} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} \,d x } \]
\[ \int (a+a \sin (e+f x))^m (A+B \sin (e+f x)) (c-c \sin (e+f x))^3 \, dx=\int { -{\left (B \sin \left (f x + e\right ) + A\right )} {\left (c \sin \left (f x + e\right ) - c\right )}^{3} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} \,d x } \]
Timed out. \[ \int (a+a \sin (e+f x))^m (A+B \sin (e+f x)) (c-c \sin (e+f x))^3 \, dx=\int \left (A+B\,\sin \left (e+f\,x\right )\right )\,{\left (a+a\,\sin \left (e+f\,x\right )\right )}^m\,{\left (c-c\,\sin \left (e+f\,x\right )\right )}^3 \,d x \]